com.rscja.team.mtk.deviceapi

## Class RFIDWithISO14443A_mtk

- java.lang.Object
- - com.rscja.team.mtk.deviceapi.RFIDBase_mtk
  - - com.rscja.team.mtk.deviceapi.RFIDWithISO14443A_mtk

- All Implemented Interfaces:
    IRFIDBase, IRFIDWithISO14443A

      public class RFIDWithISO14443A_mtk
      extends RFIDBase_mtk
      implements IRFIDWithISO14443A

  RFID模块ISO14443A协议操作类
  RFID module ISO 14443A protocol operation type

  注意：
  Attention:
  1、使用前请确认您的机器已安装此模块。
  1. Make sure this module is installed before using your device.
  2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件
  2. Put libDeviceAPI.so file in directory \libs\armeabi\ then module can be used normally.
  3、在操作设备前需要调用 `RFIDBase_mtk.init()` 打开设备，使用完后调用 `RFIDBase_mtk.free()` 关闭设备
  3. call `RFIDBase_mtk.init()` to switch on device before operating device, call `RFIDBase_mtk.free()` to switch off device after using.

  Author:
    liuruifeng

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `DESFire_AddApp(java.lang.String hexAppId, int keySetting, int fileNums)` Desfire卡 创建应用 Desfire card create application
    `boolean` | `DESFire_AddStdFile(int fileNo, int commSet, char[] accessRight, int fileSize)` Desfire卡 创建标准数据文件 Desfire card create standard data file
    `boolean` | `DESFire_AddValueFile(int fileNo, int commSet, char[] accessRights, int minValue, int maxValue, int initValue)` Desfire卡 创建值文件 Desfire card create values file
    `boolean` | `DESFire_Auth(int keyNo, java.lang.String key)` Desfire卡 验证密钥 Desfire card verify key
    `boolean` | `DESFire_ChangeFileSetting(int fileNo, int commSet, char[] accessRights)` Desfire卡 获取文件设置 Desfire card acquire file setup
    `boolean` | `DESFire_ChangeKey(int keyNo, java.lang.String newKey)` Desfire卡 更改密钥 Desfire card change key
    `boolean` | `DESFire_ChangeKeySetting(int keySetting)` Desfire卡 更改密钥设置 Desfire card change key setup
    `boolean` | `DESFire_CreditValueFile(int fileNo, int value)` Desfire卡 充值函数 Desfire card recharge formula
    `boolean` | `DESFire_DebitValueFile(int fileNo, int value)` Desfire卡 扣费函数 Desfire card deduction formula
    `boolean` | `DESFire_DelApp(java.lang.String hexAppId)` Desfire卡 删除应用 Desfire card delete application
    `boolean` | `DESFire_DelFile(int fileNo)` Desfire卡 删除文件 Desfire card delete file
    `boolean` | `DESFire_FormatCard()` Desfire卡 格式化卡片 Desfire card format card
    `java.lang.String[]` | `DESFire_GetApps()` Desfire卡 获取所有应用 Desfire card acquire all application
    `int[]` | `DESFire_GetFileIds()` Desfire卡 获取应用所有文件ID Desfire card acquire application all file ID
    `java.util.List<DESFireFile>` | `DESFire_GetFiles()` Desfire卡 获取应用所有文件 Desfire card acquire all files of application
    `byte[]` | `DESFire_GetFileSetting(int fileNo)` Desfire卡 获取文件设置 Desfire card acquire file setup
    `int[]` | `DESFire_GetKeySetting()` Desfire卡 获取密钥设置信息 Desfire card acquire key setup infor
    `java.lang.String[]` | `DESFire_GetPiccInfo()` Desfire卡 获取卡片信息 Desfire card acquire card infor
    `boolean` | `DESFire_RatsAndPss()` Desfire卡 进入14443A协议的第4层，获取通讯参数 Desfire card enter 4th level of 14443A protocol, acquire communication parameter
    `char[]` | `DESFire_ReadStdFile(int fileNo, int offSet, int dataSize)` Desfire卡 读标准文件数据 Desfire card read standard file data
    `int[]` | `DESFire_ReadValueFile(int fileNo)` Desfire卡 获取值文件内容 Desfire card acquire values file content
    `boolean` | `DESFire_SelApp(java.lang.String hexAppId)` Desfire卡 选择应用 Desfire card select application
    `void` | `DESFire_selCpy(int cpyType)` 选择加密类型 select encryption type
    `boolean` | `DESFire_WriteStdFile(int fileNo, int offSet, int dataSize, char[] dataBuf)` Desfire卡 写标准文件数据 Desfire card write standard file data
    `static RFIDWithISO14443A_mtk` | `getInstance()` 获取ISO14443A协议操作实例 Acquire ISO14443A protocol operation Instance
    `int` | `getIntegerSomeBit(int resource, int mask)` 取整数的某一位 get one place of integer
    `boolean` | `ISO14443A_decrement(int iBlockValue, int iBlockResult, int iValue)`
    `boolean` | `ISO14443A_increment(int iBlockValue, int iBlockResult, int iValue)` 电子钱包充值 E-wallet charge
    `boolean` | `ISO14443A_initval(int iBlock, int iValue)` 电子钱包初始化 E-wallet initialize
    `int[]` | `ISO14443A_readval(int iBlock)` 读取电子钱包余额 传入参数 read E-wallet balance
    `boolean` | `isPowerOn()` 判断设备是否上电 Judge the device is powered on or not.
    `char[]` | `M1_ReadData(int sector, int block)` 读取指定扇区指定block的数据，适用于S50和S70标签。使用此函数的时候，要确保该扇区密钥验证已通过。 Read data in specified block of specified sector, used for S50 and S70 tag.
    `boolean` | `M1_WriteData(int sector, int block, java.lang.String hexData)` 向指定的扇区的Block 写入数据，适用于S50和S70标签。使用此函数的时候，要确保该扇区密钥验证已通过。 Write data in specified sector of block, used for S50 and S70 tag.
    `SimpleRFIDEntity` | `read(int block)` 读卡，适用于Urltra light标签 card reading, used for Urltra light tag
    `SimpleRFIDEntity` | `read(java.lang.String key, RFIDWithISO14443A.KeyType keyType, int sector, int block)` 读卡,此函数包含寻卡和验证密钥步骤 Read card, this formula includes card search and key verfication procedure
    `SimpleRFIDEntity` | `readAllData(java.lang.String key, RFIDWithISO14443A.TagType tagType)` 读卡，读取卡片所有块中的数据 Card reading, read data of all blocks in the card
    `SimpleRFIDEntity` | `request()` 寻卡 Search card
    `char[]` | `sendBusCMD(char[] time, char[] uid, int uidnum, int flag)` /** 墨西哥公交命令 Mexico bus commande
    `byte[]` | `unvarnished_transfer(byte[] sendData)`
    `boolean` | `VerifySector(int sector, java.lang.String key, RFIDWithISO14443A.KeyType keyType)` 验证扇区。S50和S70标签需要使用到此函数。密钥验证通过才可对该扇区进行读写操作。 verificate sector.
    `boolean` | `write(int block, java.lang.String hexData)` 写卡，适用于Urltra light标签 Card writing, used for Urltra light tag
    `boolean` | `write(java.lang.String key, RFIDWithISO14443A.KeyType keyType, int sector, int block, java.lang.String hexData)` 写卡，此函数包括寻卡和密钥验证异常 Card writing, this formula includes card searching and key verification err

    - ### Methods inherited from class com.rscja.team.mtk.deviceapi.RFIDBase_mtk

      `free, getVersion, init, init, rfidUpgrade`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.rscja.deviceapi.interfaces.IRFIDBase

      `free, getVersion, init, init, isPowerOn, rfidUpgrade`

- - ### Method Detail

    - #### getInstance

          public static RFIDWithISO14443A_mtk getInstance()
                                                   throws ConfigurationException

      获取ISO14443A协议操作实例
      Acquire ISO14443A protocol operation Instance
      Returns:
        ISO14443A协议操作实例
        ISO14443A protocol operation Instance
      Throws:
        `ConfigurationException` - 配置错误异常
        Configuration err

    - #### request

          public SimpleRFIDEntity request()

      寻卡
      Search card
      Specified by:
        `request` in interface `IRFIDWithISO14443A`
      Returns:
        success will return SimpleRFIDEntity data, failure will return Null.

    - #### read

          public SimpleRFIDEntity read(java.lang.String key,
                                       RFIDWithISO14443A.KeyType keyType,
                                       int sector,
                                       int block)
                                throws RFIDVerificationException,
                                       RFIDReadFailureException

      读卡,此函数包含寻卡和验证密钥步骤
      Read card, this formula includes card search and key verfication procedure
      Specified by:
        `read` in interface `IRFIDWithISO14443A`
      Parameters:
        `key` - 密钥
        key
        `keyType` - 密钥类型
        key type
        `sector` - 扇区
        sector
        `block` - 块区
        block
      Returns:
        成功则返回 SimpleRFIDEntity数据实体，寻卡失败则返回null
        success will return SimpleRFIDEntity data, card searching failure will return Null.
      Throws:
        `RFIDVerificationException` - 密钥验证失败异常
        key verification failed
        `RFIDReadFailureException` - 读卡失败异常
        card reading failed

    - #### readAllData

          public SimpleRFIDEntity readAllData(java.lang.String key,
                                              RFIDWithISO14443A.TagType tagType)
                                       throws RFIDVerificationException,
                                              RFIDReadFailureException

      读卡，读取卡片所有块中的数据
      Card reading, read data of all blocks in the card
      Specified by:
        `readAllData` in interface `IRFIDWithISO14443A`
      Parameters:
        `key` - 密钥
        key
        `tagType` - 卡片类型
        card type
      Returns:
        成功则返回 SimpleRFIDEntity数据实体，寻卡失败则返回null
        success will return SimpleRFIDEntity data, card searching failure will return Null
      Throws:
        `RFIDVerificationException` - 密钥验证失败异常
        key verification failed
        `RFIDReadFailureException` - 读卡失败异常
        card reading failed

    - #### read

          public SimpleRFIDEntity read(int block)
                                throws RFIDReadFailureException

      读卡，适用于Urltra light标签
      card reading, used for Urltra light tag
      Specified by:
        `read` in interface `IRFIDWithISO14443A`
      Parameters:
        `block` -
      Returns:
        成功则返回 SimpleRFIDEntity数据实体，寻卡失败则返回null
        success will return SimpleRFIDEntity data, card searching failure will return Null
      Throws:
        `RFIDReadFailureException` - 读卡失败异常
        Card reading failed

    - #### write

          public boolean write(java.lang.String key,
                               RFIDWithISO14443A.KeyType keyType,
                               int sector,
                               int block,
                               java.lang.String hexData)
                        throws RFIDVerificationException,
                               RFIDNotFoundException

      写卡，此函数包括寻卡和密钥验证异常
      Card writing, this formula includes card searching and key verification err
      Specified by:
        `write` in interface `IRFIDWithISO14443A`
      Parameters:
        `key` - 密钥
        key
        `keyType` - 密钥类型
        key type
        `sector` - 扇区
        sector
        `block` - 块区
        block
        `hexData` - 十六进制数据
        hexdecimal data
      Returns:
        true成功，false失败
        true success, false failure
      Throws:
        `RFIDVerificationException` - 密钥验证失败异常
        key verification failed
        `RFIDNotFoundException` - 寻卡失败异常
        card searching failed

    - #### write

          public boolean write(int block,
                               java.lang.String hexData)
                        throws RFIDNotFoundException

      写卡，适用于Urltra light标签
      Card writing, used for Urltra light tag
      Specified by:
        `write` in interface `IRFIDWithISO14443A`
      Parameters:
        `block` - 块区
        block
        `hexData` - 十六进制数据
        hexdecimal data
      Returns:
        true成功，false失败
        true success, false failure
      Throws:
        `RFIDVerificationException` - 密钥验证失败异常
        key verification failed
        `RFIDNotFoundException` - 寻卡失败异常
        card searching failed

    - #### VerifySector

          public boolean VerifySector(int sector,
                                      java.lang.String key,
                                      RFIDWithISO14443A.KeyType keyType)

      验证扇区。S50和S70标签需要使用到此函数。密钥验证通过才可对该扇区进行读写操作。
      verificate sector. S50 and S70 tag need to use this formula. Key verification success then this sector can be used for read-write operation.
      Specified by:
        `VerifySector` in interface `IRFIDWithISO14443A`
      Parameters:
        `sector` - S50标签扇区取值范围：0 ~ 15 ; S70标签扇区取值范围：0 ~ 39
        S50 tag sector value range: 0 to 15; S70 tag sector value range: 0 to 39
        `key` - 密钥：12个十六进制数
        key: 12 hexdecimal number
        `keyType` - 密钥类型
        key type
      Returns:
        true表示验证通过，false表示验证失败
        true means verfication success, false means verification failed

    - #### M1_ReadData

          public char[] M1_ReadData(int sector,
                                    int block)
                             throws RFIDReadFailureException

      读取指定扇区指定block的数据，适用于S50和S70标签。使用此函数的时候，要确保该扇区密钥验证已通过。
      Read data in specified block of specified sector, used for S50 and S70 tag. Make sure key verification of this sector is success when using this formula.
      Specified by:
        `M1_ReadData` in interface `IRFIDWithISO14443A`
      Parameters:
        `sector` -
        `block` -
      Returns:
      Throws:
        `RFIDReadFailureException`

    - #### M1_WriteData

          public boolean M1_WriteData(int sector,
                                      int block,
                                      java.lang.String hexData)

      向指定的扇区的Block 写入数据，适用于S50和S70标签。使用此函数的时候，要确保该扇区密钥验证已通过。
      Write data in specified sector of block, used for S50 and S70 tag.
      Specified by:
        `M1_WriteData` in interface `IRFIDWithISO14443A`
      Parameters:
        `sector` -
        `block` -
        `data` - 16进制字符串
      Returns:

    - #### DESFire_RatsAndPss

          public boolean DESFire_RatsAndPss()

      Desfire卡 进入14443A协议的第4层，获取通讯参数
      Desfire card enter 4th level of 14443A protocol, acquire communication parameter
      Specified by:
        `DESFire_RatsAndPss` in interface `IRFIDWithISO14443A`
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_GetKeySetting

          public int[] DESFire_GetKeySetting()

      Desfire卡 获取密钥设置信息
      Desfire card acquire key setup infor
      Specified by:
        `DESFire_GetKeySetting` in interface `IRFIDWithISO14443A`
      Returns:
        返回null表示失败，[0]为密钥设置信息，[1]为密钥数量
        return null means failure, [0] means key setup infor, [1] means key amount

    - #### DESFire_ChangeKeySetting

          public boolean DESFire_ChangeKeySetting(int keySetting)

      Desfire卡 更改密钥设置
      Desfire card change key setup
      Specified by:
        `DESFire_ChangeKeySetting` in interface `IRFIDWithISO14443A`
      Parameters:
        `keySetting` - 密钥设置信息
        key setup infor
      Returns:
        成功 true，失败 false
        success ture, failure false

    - #### getIntegerSomeBit

          public int getIntegerSomeBit(int resource,
                                       int mask)

      取整数的某一位
      get one place of integer
      Specified by:
        `getIntegerSomeBit` in interface `IRFIDWithISO14443A`
      Parameters:
        `resource` - 要取某一位的整数
        get one place of integer
        `mask` - 要取的位置索引，自右至左为0-7
        get position index, from right to left 0-7
      Returns:
        返回某一位的值（0或者1）
        return the value of one place (0 or 1)

    - #### DESFire_SelApp

          public boolean DESFire_SelApp(java.lang.String hexAppId)

      Desfire卡 选择应用
      Desfire card select application
      Specified by:
        `DESFire_SelApp` in interface `IRFIDWithISO14443A`
      Parameters:
        `appId` - 应用ID，十六进制字符串
        Apply ID, hexdecimal char string
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_Auth

          public boolean DESFire_Auth(int keyNo,
                                      java.lang.String key)

      Desfire卡 验证密钥
      Desfire card verify key
      Specified by:
        `DESFire_Auth` in interface `IRFIDWithISO14443A`
      Parameters:
        `keyNo` - 密钥号
        key number
        `key` - 密钥
        key
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_selCpy

          public void DESFire_selCpy(int cpyType)

      选择加密类型
      select encryption type
      Specified by:
        `DESFire_selCpy` in interface `IRFIDWithISO14443A`
      Parameters:
        `cpyType` - 0x01(AES),0x02(DES)

    - #### DESFire_ChangeKey

          public boolean DESFire_ChangeKey(int keyNo,
                                           java.lang.String newKey)

      Desfire卡 更改密钥
      Desfire card change key
      Specified by:
        `DESFire_ChangeKey` in interface `IRFIDWithISO14443A`
      Parameters:
        `keyNo` - 密钥号
        key number
        `key` - 密钥
        key
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_GetApps

          public java.lang.String[] DESFire_GetApps()

      Desfire卡 获取所有应用
      Desfire card acquire all application
      Specified by:
        `DESFire_GetApps` in interface `IRFIDWithISO14443A`
      Returns:
        返回null表示失败，获取到的应用ID
        return null means failed, acquire application ID

    - #### DESFire_DelApp

          public boolean DESFire_DelApp(java.lang.String hexAppId)

      Desfire卡 删除应用
      Desfire card delete application
      Specified by:
        `DESFire_DelApp` in interface `IRFIDWithISO14443A`
      Parameters:
        `appId` - 应用ID，十六进制字符串
        Application ID, hexdecimal character string
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_FormatCard

          public boolean DESFire_FormatCard()

      Desfire卡 格式化卡片
      Desfire card format card
      Specified by:
        `DESFire_FormatCard` in interface `IRFIDWithISO14443A`
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_GetPiccInfo

          public java.lang.String[] DESFire_GetPiccInfo()

      Desfire卡 获取卡片信息
      Desfire card acquire card infor
      Specified by:
        `DESFire_GetPiccInfo` in interface `IRFIDWithISO14443A`
      Returns:
        返回null表示失败，获取Picc信息
        return null means failed, acquire Picc infor

    - #### DESFire_AddApp

          public boolean DESFire_AddApp(java.lang.String hexAppId,
                                        int keySetting,
                                        int fileNums)

      Desfire卡 创建应用
      Desfire card create application
      Specified by:
        `DESFire_AddApp` in interface `IRFIDWithISO14443A`
      Parameters:
        `hexAppId` - 应用ID，十六进制字符串
        Apply ID, hexdecimal charactor string
        `keySetting` - 密钥设置
        key setup
        `fileNums` - 所包含的文件数
        File amount included
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_GetFileIds

          public int[] DESFire_GetFileIds()

      Desfire卡 获取应用所有文件ID
      Desfire card acquire application all file ID
      Specified by:
        `DESFire_GetFileIds` in interface `IRFIDWithISO14443A`
      Returns:
        返回null表示失败，获取到的文件ID
        return null means failure, acquire file ID

    - #### DESFire_GetFiles

          public java.util.List<DESFireFile> DESFire_GetFiles()

      Desfire卡 获取应用所有文件
      Desfire card acquire all files of application
      Specified by:
        `DESFire_GetFiles` in interface `IRFIDWithISO14443A`
      Returns:

    - #### DESFire_GetFileSetting

          public byte[] DESFire_GetFileSetting(int fileNo)

      Desfire卡 获取文件设置
      Desfire card acquire file setup
      Specified by:
        `DESFire_GetFileSetting` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        File number
      Returns:
        返回null表示失败
        return null means failure

    - #### DESFire_ChangeFileSetting

          public boolean DESFire_ChangeFileSetting(int fileNo,
                                                   int commSet,
                                                   char[] accessRights)

      Desfire卡 获取文件设置
      Desfire card acquire file setup
      Specified by:
        `DESFire_ChangeFileSetting` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        file number
        `commSet` - 通讯设置
        communication setup
        `accessRights` - 存取权限
        save permission
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_DelFile

          public boolean DESFire_DelFile(int fileNo)

      Desfire卡 删除文件
      Desfire card delete file
      Specified by:
        `DESFire_DelFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        File number
      Returns:
        success true, failure false

    - #### DESFire_AddStdFile

          public boolean DESFire_AddStdFile(int fileNo,
                                            int commSet,
                                            char[] accessRight,
                                            int fileSize)

      Desfire卡 创建标准数据文件
      Desfire card create standard data file
      Specified by:
        `DESFire_AddStdFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        File number
        `commSet` - 通讯设置
        communication setup
        `accessRight` - 存取权限
        save permission
        `fileSize` - 文件大小
        file size
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_WriteStdFile

          public boolean DESFire_WriteStdFile(int fileNo,
                                              int offSet,
                                              int dataSize,
                                              char[] dataBuf)

      Desfire卡 写标准文件数据
      Desfire card write standard file data
      Specified by:
        `DESFire_WriteStdFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        File number
        `offSet` - 起始位置偏移量
        Initial position shift
        `dataSize` - 数据大小
        Data size
        `dataBuf` - 数据，1~200个字节
        Data, 1 to 200 byte
      Returns:
        success true, failure false

    - #### DESFire_ReadStdFile

          public char[] DESFire_ReadStdFile(int fileNo,
                                            int offSet,
                                            int dataSize)

      Desfire卡 读标准文件数据
      Desfire card read standard file data
      Specified by:
        `DESFire_ReadStdFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        file number
        `offSet` - 起始位置偏移量
        Initial position shift
        `dataSize` - 数据大小
        Data size
      Returns:
        return null means failed

    - #### DESFire_AddValueFile

          public boolean DESFire_AddValueFile(int fileNo,
                                              int commSet,
                                              char[] accessRights,
                                              int minValue,
                                              int maxValue,
                                              int initValue)

      Desfire卡 创建值文件
      Desfire card create values file
      Specified by:
        `DESFire_AddValueFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        File number
        `commSet` - 通讯设置
        Communication setup
        `accessRights` - 存取权限
        Save permission
        `minValue` - 最小值
        minValue
        `maxValue` - 最大值
        maxValue
        `initValue` - 初始值
        Initial value
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### DESFire_ReadValueFile

          public int[] DESFire_ReadValueFile(int fileNo)

      Desfire卡 获取值文件内容
      Desfire card acquire values file content
      Specified by:
        `DESFire_ReadValueFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        File number
      Returns:
        返回null表示失败
        return null means failure

    - #### DESFire_CreditValueFile

          public boolean DESFire_CreditValueFile(int fileNo,
                                                 int value)

      Desfire卡 充值函数
      Desfire card recharge formula
      Specified by:
        `DESFire_CreditValueFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        file number
        `value` - 充入的值
        value charged
      Returns:
        成功 true，失败 false
        success true, failed false

    - #### DESFire_DebitValueFile

          public boolean DESFire_DebitValueFile(int fileNo,
                                                int value)

      Desfire卡 扣费函数
      Desfire card deduction formula
      Specified by:
        `DESFire_DebitValueFile` in interface `IRFIDWithISO14443A`
      Parameters:
        `fileNo` - 文件号
        file number
        `value` - 扣除的值
        value deducted
      Returns:
        成功 true，失败 false
        success true, failure false

    - #### ISO14443A_increment

          public boolean ISO14443A_increment(int iBlockValue,
                                             int iBlockResult,
                                             int iValue)

      电子钱包充值
      E-wallet charge
      Specified by:
        `ISO14443A_increment` in interface `IRFIDWithISO14443A`
      Parameters:
        `iBlockValue` - 当前金额所在块
        iBlockValue current value block
        `iBlockResult` - 充值后剩余金额保存的块
        saved block of balance after recharge
        `iValue` - 金额返回值：0为成功，非0为失败状态码
        figure returned value: 0 means success, NZ means failure status code
      Returns:

    - #### ISO14443A_decrement

          public boolean ISO14443A_decrement(int iBlockValue,
                                             int iBlockResult,
                                             int iValue)

      Specified by:
        `ISO14443A_decrement` in interface `IRFIDWithISO14443A`

    - #### ISO14443A_initval

          public boolean ISO14443A_initval(int iBlock,
                                           int iValue)

      电子钱包初始化
      E-wallet initialize
      Specified by:
        `ISO14443A_initval` in interface `IRFIDWithISO14443A`
      Parameters:
        `iBlock` - 要写入数据的绝对块号 块号范围 0~63
        absolute block numbers need to write data block number range 0 to 63
        `iValue` - 初始金额
        iValue initial value
      Returns:

    - #### ISO14443A_readval

          public int[] ISO14443A_readval(int iBlock)

      读取电子钱包余额 传入参数
      read E-wallet balance
      Specified by:
        `ISO14443A_readval` in interface `IRFIDWithISO14443A`
      Parameters:
        `iBlock` - iBlock要读取数据的绝对块号 块号范围 0~63
        Block read absolute block number of data block number range: 0 to 63
      Returns:
        第0个元素是状态位，0表示成功，非零为错误码，如果为错误码，后面无数据2)第1个元素是读取到的余额
        number 0 is status bit, 0 means success, NZ means error code, if it is error code, there is no data after.

    - #### sendBusCMD

          public char[] sendBusCMD(char[] time,
                                   char[] uid,
                                   int uidnum,
                                   int flag)

      /** 墨西哥公交命令
      Mexico bus commande
      Specified by:
        `sendBusCMD` in interface `IRFIDWithISO14443A`
      Parameters:
        `time` - 时分秒,3字节
        `time` - hrs. 3 bytes
        `uid` - 卡号缓存
        `uid` - card number cache
        `uidnum` - 卡号 数量
        `uidnum` - card number amount
        `flag` - 0：无上下车信息， 1： 上车 ，2 ：下车
        `flag` - 0: no data of get on and off, 1: get on, 2: get off
      Returns:
        第一字节： 0：成功， 其他失败;
        1st byte: 0: success, others: failure
        第二字节：长度， 后续数据长度;
        2nd byte: length, follow-up data length
        第三字节： 0：无上下车信息， 1： 上车 ，2 ：下车;
        3rd byte: 0: no data of get on and off, 1: get on, 2: get off;
        第四字节---：为卡金信息（4字节卡号+2字节金额）的数据集 ，长度为 第二字节减一
        4th byte--- : data set of amount in card (4 bytes card number+ 2 bytes amount), length is 2nd byte minus one

    - #### unvarnished_transfer

          public byte[] unvarnished_transfer(byte[] sendData)

      Specified by:
        `unvarnished_transfer` in interface `IRFIDWithISO14443A`

    - #### isPowerOn

          public boolean isPowerOn()

      判断设备是否上电
      Judge the device is powered on or not.
      Returns: